import request from "../../utils/request"

class API {
    //获取
    static getShopCar = (data:any) => request.post("/shopCar",{user_id:data._id,token:data.token})

    //数量
    static countAdd = (data:any) => request.post("/shopCar/shopCarCountAdd",{user_id:data.user_id,token:data.token,goods_name:data.goods_name})

    static countDel = (data:any) => (request.post("/shopCar/shopCarCountDel",{user_id:data.user_id,token:data.token,goods_name:data.goods_name}))

    //删除
    static shopCarDel = (data:any) => (request.post("/shopCar/shopCarDel/"+data.id,{token:data.token}))

    //加入购物车
    static shopCarAdd = (data:any) => (request.post("/shopCar/shopCarAdd",{user_id:data.user_id,token:data.token,goods_name:data.goods_name,cutlery:data.cutlery,price:data.price,img:data.img,specs:data.specs}))
}

export default API